<%--
  Created by IntelliJ IDEA.
  User: CY
  Date: 2018/5/16
  Time: 15:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%  String point=(String) request.getSession().getAttribute("coordinatePoint");%>
<html>
<head>
    <title>智慧综治</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=YECw4heQ9wzy7RKg8OW9QLMsySKzQRan"></script>
    <link rel="stylesheet" type="text/css" href="/css/street/street.css"/>
    <link rel="stylesheet" href="/css/officialDocument/officialDocument.css">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <%--<script src="/js/street/TwoPointFive.js"></script>--%>
    <style>
        html{height:100%}
        body{height:100%;margin:0px;padding:0px}
        .head{height:50px}
        #map{width:100%;height:100%}
        .rightNav {
            position: fixed;
            top: 20%;
            right: 1%;
            width: 135px;
            height: 220px;
            z-index: 999;
            /*display: none;*/
        }
        .rightNav .one{
            background: url(/img/grid/btnxuanzhong.png) no-repeat;
            background-size: 100% 100%;
            -ms-behavior: url(/css/main/backgroundsize.min.htc);
            behavior: url(/css/main/backgroundsize.min.htc);
            width: 96%;
            height: 34px;
            line-height: 34px;
            margin-top: 10px;
            cursor: pointer;
            color: #fff;
            text-align: center;
            font-size: 14px;
        }
        .rightNav .one.active {
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .rightNav .one:hover{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }

        .leftNav {
            position: fixed;
            top: 20%;
            left: 1%;
            width: 135px;
            height: 220px;
            z-index: 999;
            display: none;
        }
        .leftNav .two{
            background: url(/img/grid/btnxuanzhong.png) no-repeat;
            background-size: 100% 100%;
            -ms-behavior: url(/css/main/backgroundsize.min.htc);
            behavior: url(/css/main/backgroundsize.min.htc);
            width: 96%;
            height: 34px;
            line-height: 34px;
            margin-top: 10px;
            cursor: pointer;
            color: #fff;
            text-align: center;
            font-size: 14px;
        }
        .leftNav .two.active {
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .leftNav .two:hover{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .outer{
            width:90px;
            height:30px;
            position:absolute;
            background-size:100% ;
            z-index: 99999;
            cursor:pointer;
        }
        .inner{
            color:#fff;
            font-size:14px;
            display: inline-block;
            width:73px;
            text-align: center;
            position: relative;
            cursor:pointer;
            /*line-height: 36px;*/
            /*padding-left:40px;*/
            /*padding-top: 4px;*/
            /*word-break: break-all;*/
            /*text-overflow: ellipsis;*/
            /*display: -webkit-box; !** 对象作为伸缩盒子模型显示 **!*/
            /*-webkit-box-orient: vertical; !** 设置或检索伸缩盒对象的子元素的排列方式 **!*/
            /*-webkit-line-clamp: 1; !** 显示的行数 **!*/
            /*overflow: hidden;  !** 隐藏超出的内容 **!*/
        }
        .txt{
            color:#fff;
            font-size:14px;
            display: inline-block;
            width:56px;
            text-align: center;
            position: relative;
            cursor:pointer;
            line-height: 23px;
            padding-left:32px;
            padding-top: 4px;
            word-break: break-all;
            text-overflow: ellipsis;
            display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
            -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
            -webkit-line-clamp: 1; /** 显示的行数 **/
            overflow: hidden;  /** 隐藏超出的内容 **/
        }
        .headImg{
            position: absolute;
            left: -37px;
            top: 0px;
        }
        .topName{
            display: inline-block;
            width: 80px;
            line-height: 30px;
            padding-left: 30px;
            text-align: left;
        }
        .botName{
            display: inline-block;
            width: 100px;
            line-height: 22px;
            padding-left: 30px;
            text-align: left;
        }

        .clearfx{
            width:100%;
            line-height: 50px;
            font-size:14px;
            /*height: 50px;*/
        }
        .cont{
            border-bottom: 1px dashed #eeeeee;
            width:80%;
            /*height:50px;*/
            /*margin-left: 40px;*/
            float:left
        }
        .left{
            /*width:30%;*/
            /*float:left;*/
            text-align: right;
            margin-left:3px;
        }
        .right{
            width:64%;
            /*float:left;*/
            text-align: left;
            margin-left:5%;
        }
        .img{
            float:left;
            vertical-align: middle;
            margin-top: 15px;
            margin-left:20px;
        }
        table{
            width:90%;
            margin:10px auto;
        }
    </style>
    <script src="/js/jquery/jquery-1.9.1.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layer/layer.js?20201106" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <%--<script type="text/javascript" src="/js/street/Library.js"></script>--%>
</head>
<body onload="maps.house()">
<ul class="rightNav">
    <li class="one active" data-type="0">出租屋</li>
    <%--<li class="one" data-type="1">基础数据</li>--%>
    <%--<li class="one" data-type="2">布控点位</li>--%>
</ul>
<ul class="house leftNav" style="display: block;">
    <%--<li class="two active" data-type="0">出租屋</li>--%>
    <li class="two" data-type="1">刑满释放人员</li>
    <li class="two" data-type="2">社区矫正人员</li>
    <li class="two" data-type="3">易肇事肇祸人员</li>
    <li class="two" data-type="4">吸毒人员</li>
    <li class="two" data-type="5">重点信访人员</li>
    <li class="two" data-type="6">校园及周边信息</li>
</ul>
<ul class="qiye leftNav">
    <li class="two active" data-type="0">社区委员会</li>
    <li class="two" data-type="1">车棚</li>
    <li class="two" data-type="2">群防群治布控点位</li>
    <li class="two" data-type="3">巡逻警务站点</li>
    <li class="two" data-type="4">电子显示屏</li>
    <li class="two" data-type="5">视频监控系统</li>
    <li class="two" data-type="6">物业公司</li>
    <li class="two" data-type="7">变电站</li>
</ul>
<ul class="taizang leftNav">
    <li class="two active" data-type="0">一级超常</li>
    <li class="two" data-type="1">一级布控</li>
    <li class="two" data-type="2">二级布控</li>
    <li class="two" data-type="3">三级布控</li>
</ul>
<div id="map"></div>
<script>

    var map = new BMap.Map("map");
//    var point = new BMap.Point(118.019131,34.341107);
    var point = new BMap.Point(<%=point%>); //创建点坐标
    var map = new BMap.Map("map", {mapType: BMAP_HYBRID_MAP, minZoom: 1, maxZoom: 18});
    //设置地图类型及最小最大级别
    //    var marker = new BMap.Marker(point); //将点转化成标注点
    //    map.addOverlay(marker);  //将标注点添加到地图上
    map.addControl(new BMap.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));
    //设置地图级别（1-18）
    map.centerAndZoom(point, 12);
    //开启滚轮缩放地图
    map.enableScrollWheelZoom();

    //    绘制自定义覆盖物
    //    //        1\定义构造函数
    function ComplexCustomOverlay(point,img,name,id,con,grid,type,title){
        this._point = point;
        this._img = img;
        this._name = name;
        this._id = id;
        this._con = con;
        this._grid = grid;
        this._type = type;
        this._title = title;
    }
    // 继承API的BMap.Overlay
    ComplexCustomOverlay.prototype = new BMap.Overlay();
    //2、初始化自定义覆盖物实现初始化方法
    ComplexCustomOverlay.prototype.initialize = function(map){
        // 保存map对象实例
        this._map = map;
        // 创建div元素，作为自定义覆盖物的容器
        var div = this._div = document.createElement("div");
        div.style.backgroundImage = 'url('+this._img+')'
        div.setAttribute('class','outer');
        div.setAttribute('name',this._name);
        div.setAttribute('id',this._id);
        div.setAttribute('content',this._con);
        div.setAttribute('grid',this._grid);
        div.setAttribute('type',this._type);
        div.setAttribute('title',this._title);

        div.innerHTML= '<div class="inner">'+this._con+'</div>'
        // 将div添加到覆盖物容器中
        map.getPanes().labelPane.appendChild(div);
        //getPanes(),返回值:MapPane,返回地图覆盖物容器列表  labelPane呢???
        // 需要将div元素作为方法的返回值，当调用该覆盖物的show、
        // hide方法，或者对覆盖物进行移除时，API都将操作此元素。
        return div;
    }
    //3、绘制覆盖物
    // 实现绘制方法
    ComplexCustomOverlay.prototype.draw = function(){
        var _map = this._map;
//            var marker = new BMap.Marker(_map);
//            map.overlayPixelToPoint(this._point);
        var pixel = map.pointToOverlayPixel(this._point);
        this._div.style.left = pixel.x - 50 + "px";
        this._div.style.top  = pixel.y - 20 + "px";
    }

    //    nav点击事件
    $('.rightNav .one').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            $('.house').show();
            $('.qiye').hide();
            $('.taizang').hide();
            $('.house li').eq(0).addClass('active').siblings().removeClass('active');
            map.clearOverlays();
            maps.house();
        }else if($(this).attr('data-type')==1){
            $('.qiye').show();
            $('.house').hide();
            $('.taizang').hide();
            $('.qiye li').eq(0).addClass('active').siblings().removeClass('active');
            map.clearOverlays();
            maps.Community();
        }else if($(this).attr('data-type')==2){
            $('.qiye').hide();
            $('.house').hide();
            $('.taizang').show();
            $('.taizang li').eq(0).addClass('active').siblings().removeClass('active');
            map.clearOverlays();
            maps.eat();
        }
    })
    $('.house .two').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.house();

        }else if($(this).attr('data-type')==1){//刑满释放人员
            map.clearOverlays();
            maps.xmsf()

        }else if($(this).attr('data-type')==2){ //社区矫正
            map.clearOverlays();
            maps.shequ()

        }else if($(this).attr('data-type')==3){ //易肇事
            map.clearOverlays();
            maps.easy()
        }else if($(this).attr('data-type')==4){ //吸毒人员
            map.clearOverlays();
            maps.drug()
        }else if($(this).attr('data-type')==5){ //信访人员
            map.clearOverlays();
            maps.xinfang()
        }else if($(this).attr('data-type')==6){
            map.clearOverlays();
            maps.school()
        }
    })

    $('.qiye .two').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.Community();
        }else if($(this).attr('data-type')==1){
            map.clearOverlays();
            maps.cars()
        }else if($(this).attr('data-type')==2){
            map.clearOverlays();
            maps.all()
        }else if($(this).attr('data-type')==3){
            map.clearOverlays();
            maps.xunluo()
        }else if($(this).attr('data-type')==4){
            map.clearOverlays();
            maps.Electronics()
        }else if($(this).attr('data-type')==5){
            map.clearOverlays();
            maps.vedio()
        }else if($(this).attr('data-type')==6){
            map.clearOverlays();
            maps.wuye()
        }else if($(this).attr('data-type')==7){
            map.clearOverlays();
            maps.charge()
        }
    })
    $('.taizang .two').click(function(){
        $(this).addClass('active').siblings().removeClass('active');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.eat();
        }else if($(this).attr('data-type')==1){
            map.clearOverlays();
            maps.openWall()
        }else if($(this).attr('data-type')==2){
            map.clearOverlays();
            maps.openWallManager()
        }else if($(this).attr('data-type')==3){
            map.clearOverlays();
            maps.car()
        }else if($(this).attr('data-type')==4){
            map.clearOverlays();
            maps.build()
        }else if($(this).attr('data-type')==5){
            map.clearOverlays();
            maps.door()
        }else if($(this).attr('data-type')==6){
            map.clearOverlays();
            maps.unlicensed()
        }
    })

    function check(name){
        if(name == undefined){
            return ''
        }else{
            return name;
        }
    }

    $(document).on('click','.outer',function(){
        var type=$(this).attr('type');
        var id = $(this).attr('id');
        var name = $(this).attr('name');
        if(type == 1){
            $.get('/sv1/pzhouserent/selectrentbyrentid',{rentId:id,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['出租房信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
//                    content:'<table>' +
//                    '<thead><tr><th style="width:15%">所属网格</th><th style="width:20%">楼门房号</th><th>承租人</th><th>出租用途</th><th>租赁备案证号：</th></tr></thead><tbody class="list">' +
//                    '</tbody></table>',
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">所属网格:</span><span class="right">'+check(data.gridName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">楼门房号:</span><span class="right">'+check(data.houseName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">承租人:</span><span class="right">'+check(data.rentLessee) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">出租用途:</span><span class="right">'+check(data.rentUseStr) +'</span></div></li>' +
                    '</ul>'
//                    success:function(){
//                        var str =''
//
//                            str += '<tr><td>'+check(data.gridName)+'</td><td>'+check(data.houseName)+'</td><td>'+check(data.rentLessee)+'</td><td>'+check(data.rentUse)+'</td><td>'+check(data.rentNum)+'</td></tr>'
//
//                        $('.list').html(str)
//                    }
                })
            })
        }else if(type == 2){
            $.get('/esCommittee/selectById',{cid:id,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['社区委员会信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 3){
            $.get('/esCarport/selectById',{pid:id,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['车棚信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.direstorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 4){
            $.get('/esGroupControl/queryListByLoc',{gridLocation:name,
                page:1,
                pageSize:10,
                useFlag:true},function(res){
                var data= res.datas;
                layer.open({
                    type:1,
                    title: ['群防群治信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">主管部门</th><th style="width:30%">负责人</th><th>联系方式</th><th>具体任务</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].directorDept+'</td><td>'+data[i].responsible+'</td><td>'+data[i].contact+'</td><td>'+data[i].location+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 5){
            $.get('/esPoliceStation/selectById',{sid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['巡逻警务信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 6){
            $.get('/esDisplay/selectById',{eid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['电子显示屏信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 7){
            $.get('/esMonitorSystem/queryListByLoc',{gridLocation:name,page:1,
            pageSize:5,
            useFlag:true},function(res){
                var data= res.datas;
                layer.open({
                    type:1,
                    title: ['视频监控信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['650px', '520px'],
                    btn: 0,
                    content:'<table>' +
                    '<thead><tr><th style="width:20%">主管部门</th><th style="width:30%">负责人</th><th>联系方式</th><th>具体任务</th></tr></thead><tbody class="list">' +
                    '</tbody></table>',
                    success:function(){
                        var str =''
                        for(var i=0;i<data.length;i++){
                            str += '<tr><td>'+data[i].directorDept+'</td><td>'+data[i].responsible+'</td><td>'+data[i].contact+'</td><td>'+data[i].location+'</td></tr>'
                        }
                        $('.list').html(str)
                    }
                })
            })
        }else if(type == 8){
            $.get('/esPropertyCompany/selectById',{pid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['物业信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 9){
            $.get('/esSubstation/selectById',{bid:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['变电站信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsible) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 10){
            $.get('/sv1/pzfullrelease/selectFullReleaseId',{pId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['刑满释放人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">人员:</span><span class="right">'+check(data.pName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">原罪名:</span><span class="right">'+check(data.pCriminality) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">服刑(劳教)场所:</span><span class="right">'+check(data.pSerSentence) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">原判刑期:</span><span class="right">'+check(data.pImpTime) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 11){
            $.get('/pzCorrection/selectById',{correctionId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['社区矫正人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">人员:</span><span class="right">'+check(data.personName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">关注程度:</span><span class="right">'+check(data.attentionLevelStr) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">原羁押场所:</span><span class="right">'+check(data.detentionOriginalPlace) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">具体罪名:</span><span class="right">'+check(data.specificCharges) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 12){
            $.get('/PzEasyAccident/selectById',{easyAccidentId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['易肇事肇祸人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">人员:</span><span class="right">'+check(data.pName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">患病名称:</span><span class="right">'+check(data.disease) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">危险程度:</span><span class="right">'+check(data.dangerDegreeStr) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">初次发病日期:</span><span class="right">'+check(data.firstDate) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 13){
            $.get('/pzDrug/selectById',{drugId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['吸毒人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">人员:</span><span class="right">'+check(data.pName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">初次发现时间:</span><span class="right">'+check(data.firstFindTime) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">查获日期:</span><span class="right">'+check(data.seizedDate) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">滥用毒品种类:</span><span class="right">'+check(data.drugAbuse) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 14){
            $.get('/PzKeyPetition/selectbyid',{keyPetitionsId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['重点信访人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">人员:</span><span class="right">'+check(data.pName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">关注程度:</span><span class="right">'+check(data.degreeConcernStr) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">上访状态:</span><span class="right">'+check(data.statusPetitionsStr) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 15){
            $.get('/pzCampusInfo/selectById',{sId:id},function(res){
                var data= res.object;
                layer.open({
                    type:1,
                    title: ['校园人员信息', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">学校名称:</span><span class="right">'+check(data.schoolName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newsq.png" alt="" class="img"><div class="cont"><span class="left">学校地址:</span><span class="right">'+check(data.schoolAddress) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">治保人数:</span><span class="right">'+check(data.securityNum) +'</span></div></li>' +
                    '<li class="clearfx"><img src="../../img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">主要负责人:</span><span class="right">'+check(data.mainResPerson) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }
    })



    var maps={
//        出租屋
        house:function(){
            var overlays = [];
            $.ajax({
                url:'/sv1/pzhouserent/selectrentorderbyrentconcern',
                data:{
                    page:1,
                    pageSize:100,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/home.png';
                         var con = '<span class="txt">'+overlays[j].houseLocation+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].gridLocation,overlays[j].rentId ,'','',1,overlays[j].houseLocation );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
//        社区委员会
        Community:function(){
            var overlays = [];
            $.ajax({
                url:'/esCommittee/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].c1 !="" && data[i].c1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].c1.split(',')[0];
                        var lat = overlays[j].c1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/grid.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].c1,overlays[j].cid ,con,'',2,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        车棚
        cars:function(){
            var overlays = [];
            $.ajax({
                url:'/esCarport/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].p1 !="" && data[i].p1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].p1.split(',')[0];
                        var lat = overlays[j].p1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/car.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].p1,overlays[j].pid ,con,'',3,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        群防群治
        all:function(){
            var overlays = [];
            $.ajax({
                url:'/esGroupControl/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].t1 !="" && data[i].t1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].t1.split(',')[0];
                        var lat = overlays[j].t1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/bukong.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].t1,overlays[j].tid ,con,'',4,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

//        巡逻警务
        xunluo:function(){
            var overlays = [];
            $.ajax({
                url:'/esPoliceStation/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 !="" && data[i].s1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].s1.split(',')[0];
                        var lat = overlays[j].s1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/xun.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].s1,overlays[j].sid ,con,'',5,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },


//        电子显示屏
        Electronics:function(){
            var overlays = [];
            $.ajax({
                url:'/esDisplay/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].e1 !="" && data[i].e1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].e1.split(',')[0];
                        var lat = overlays[j].e1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/xiu.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].e1,overlays[j].eid ,con,'',6,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //        视频监控
        vedio:function(){
            var overlays = [];
            $.ajax({
                url:'/esMonitorSystem/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].m1 !="" && data[i].m1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].m1.split(',')[0];
                        var lat = overlays[j].m1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/video.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].m1,overlays[j].mid ,con,'',7,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //       物业
        wuye:function(){
            var overlays = [];
            $.ajax({
                url:'/esPropertyCompany/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].p1 !="" && data[i].p1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].p1.split(',')[0];
                        var lat = overlays[j].p1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/wuye.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].p1,overlays[j].pid ,con,'',8,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },

        //        变电站
        charge:function(){
            var overlays = [];
            $.ajax({
                url:'/esSubstation/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].b1 !="" && data[i].b1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].b1.split(',')[0];
                        var lat = overlays[j].b1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/noZi/bukong.png';
                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].b1,overlays[j].bid ,con,'',9,overlays[j].location );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //刑满释放
        xmsf:function(){
            var overlays = [];
            $.ajax({
                url:'/sv1/pzfullrelease/selectFullRelease',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/xmsf.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].gridLocation,overlays[j].pId1 ,'','',10,overlays[j].pName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //社区矫正
        shequ:function(){
            var overlays = [];
            $.ajax({
                url:'/pzCorrection/queryAll',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/shequ.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].gridLocation,overlays[j].correctionId ,'','',11,overlays[j].pName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //易肇事
        easy:function(){
            var overlays = [];
            $.ajax({
                url:'/PzEasyAccident/selectByLimit',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation !="" && data[i].gridLocation != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].gridLocation.split(',')[0];
                        var lat = overlays[j].gridLocation.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/easy.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].gridLocation,overlays[j].easyAccidentId ,'','',12,overlays[j].pName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //吸毒人员
        drug:function(){
            var overlays = [];
            $.ajax({
                url:'/pzDrug/queryPzDrug',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false,
                    documentType:0,
                    printDate:"",
                    dispatchType:"",
                    title:"",
                    docStatus:"",
                    output:0,
                    pCradId:"",
                    pName:""
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].pzPersonServices[0].remark1 !="" && data[i].pzPersonServices[0].remark1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = data[j].pzPersonServices[0].remark1.split(',')[0];
                        var lat = data[j].pzPersonServices[0].remark1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/drug.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].pzPersonServices[0].remark1,overlays[j].drugId ,'','',13,overlays[j].pName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //重点信访人员
        xinfang:function(){
            var overlays = [];
            $.ajax({
                url:'/PzKeyPetition/queryPzKeyPetition',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].remarks1 !="" && data[i].remarks1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].remarks1.split(',')[0];
                        var lat = overlays[j].remarks1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/xinfang.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].remarks1,overlays[j].keyPetitionsId ,'','',14,overlays[j].pName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        //校园
        school:function(){
            var overlays = [];
            $.ajax({
                url:'/pzCampusInfo/queryAll',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data = res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].str1 !="" && data[i].str1 != undefined){
                            overlays.push(data[i])
                        }
                    }
                    for(var j = 0;j<overlays.length;j++){
                        var lng = overlays[j].str1.split(',')[0];
                        var lat = overlays[j].str1.split(',')[1];
                        var point = new BMap.Point(lng,lat)
                        var Icon = '../../img/map/school.png';
//                        var con = '<span class="txt">'+overlays[j].location+'</span>'
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].str1,overlays[j].sId ,'','',15,overlays[j].schoolName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
    }

</script>
</body>
</html>

